<template>
    <div class="banner">
          <!-- <img src="~assets/img/happy/banner.png" alt=""> -->
          <div class="kind-container">
            <div class="kind-content">
               <a href="javascript:;" class="link-btn link-blessing" @click="onHash('')"></a>
               <a href="javascript:;" class="link-btn link-free" @click="onHash('free')"></a>
               <a href="javascript:;" class="link-btn link-second" @click="onHash('second')"></a>
            </div>
          </div>
          <a href="javascript:;" class="link-btn link-share" @click="onShare"></a>
      </div>
</template>

<script>
import store from '../store/index'
import {sharefacebook , alertDialogCommpent } from '../api/util'
import alertcompont from 'commpents/alertcompont.vue'
export default {
  data() {
    return {
      
    }
  },
  props:['name'],
  components: {

  },
  methods: {
    onHash(hash){
      var userinfo = this.userinfo
      var router = this.$router
      // if(userinfo.isMobile == false){
      //   return alert('請下載RC语音app參與哦~') 
      // }
      router.push({ name: (hash ? hash : '/') })
      if(hash == 'free'){
          var obj = {}
          obj.title = '友情提示'
          obj.reward = '買一送一活動已結束'
          alertDialogCommpent(alertcompont,obj)
      }
    },
    onShare(){
      sharefacebook()
    }
  },
  mounted: function () {
    var vm = this
    
  },
  computed: {
    userinfo(){
      return store.getters.userinfo
    }
  }
}
</script>
<style lang="less" scope>
    @import url('~assets/less/_mixins.less');
</style>